package com.longai.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * MomentComment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "momentcomment", catalog = "longai")
public class MomentComment implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */

	private Integer momentcommentId;
	private Moment moment;
	private User user;
	private String momentcommentcontent;
	private Long momentcontentpubtime;

	// Constructors

	/** default constructor */
	public MomentComment() {
	}

	/** full constructor */
	public MomentComment(Moment moment, User user, String momentcommentcontent,
			Long momentcontentpubtime) {
		this.moment = moment;
		this.user = user;
		this.momentcommentcontent = momentcommentcontent;
		this.momentcontentpubtime = momentcontentpubtime;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "momentcomment_id", unique = true, nullable = false)
	public Integer getMomentcommentId() {
		return this.momentcommentId;
	}

	public void setMomentcommentId(Integer momentcommentId) {
		this.momentcommentId = momentcommentId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "moment_id")
	public Moment getMoment() {
		return this.moment;
	}

	public void setMoment(Moment moment) {
		this.moment = moment;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "user_id")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "momentcommentcontent", length = 200)
	public String getMomentcommentcontent() {
		return this.momentcommentcontent;
	}

	public void setMomentcommentcontent(String momentcommentcontent) {
		this.momentcommentcontent = momentcommentcontent;
	}

	@Column(name = "momentcontentpubtime")
	public Long getMomentcontentpubtime() {
		return this.momentcontentpubtime;
	}

	public void setMomentcontentpubtime(Long momentcontentpubtime) {
		this.momentcontentpubtime = momentcontentpubtime;
	}

}